Sqlj is a convention for embedding those sql statements in java , in a way that allows programming tools to perform translation - time compile - time analysis of sql in java , for syntax checking of sql statements , for type checking to determine that the data exchanged between java and sql have compatible types and proper type conversions , and for schema checking to assure that the sql constructs are well - formed and valid in the database schema where they will be executed Sqlj是在java中嵌入這些sql語句的一種約定,它是以某種允許編程工具對java中sql進行編譯時分析的方式實現嵌入的,在編譯時會對sql語句進行語法檢查以保證語法的正確性,進行類型檢查以確定java和sql之間交換的數據具有兼容的類型和適當的類型轉換,以及進行模式檢查以確保sql結構在它們執行時所在的數據庫模式中是格式良好的、合法的。